package com.lee.dutylower.domain;

/**
 * Created by lijie on 2017/5/12.
 */

public enum SentryTypeEnum {
    QUARTER(15,"一个半小时岗"),THREE_QUARTER(45,"全上午岗"),NINE_QUARTER(90,"全白天岗");
    private String content;
    private int type;
    SentryTypeEnum(int type, String content) {
        this.type = type;
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
    public static SentryTypeEnum getByType(int type){
        SentryTypeEnum result = null;
        switch (type){
            case 15:
                result = QUARTER;
                break;
            case 45:
                result = THREE_QUARTER;
                break;
            case 90:
                result = NINE_QUARTER;
                break;
        }
        return result;
    }

    @Override
    public String toString() {
        return content;
    }
}
